<meta charset="utf-8">
<style>
    .box{
        position: relative;
    }
    #d1{
        position: absolute;
        top: 0;
        left: 0;
        width:50px;
        height: 50px;
        opacity: 0;
        border:none;
        outline: none;
    }
</style>
<input id="d2"/>
<br/><br/>
<div class="box">
    <img src = "1.jpg" width="50"/>
    <input type="button" value="1" id="d1"/>
</div>

<script>
    d1.onclick = function(){
        d2.value = d2.value + "1";
    }
</script>
